package com.pro.service.imple;/*
    @description: TDD
    @author: 赵自强
    @date: 2022/1/27 5:44
*/

import com.pro.mapper.OrderMapper;
import com.pro.pojo.JsUser;
import com.pro.pojo.JsUserOrder;
import com.pro.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImple implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    /*
     * create by: 赵自强
     * create time: 2022/1/27 5:47
     * @return com.pro.pojo.JsonData
     * 获取所有课程订单 getCourseOrders
     */
    @Override
    public List<JsUserOrder> getCourseOrders(JsUserOrder jsUserOrder) {
        return orderMapper.getCourseOrders(jsUserOrder);
    }
    /*
     * create by: 赵自强
     * create time: 2022/1/27 20:18
     * @return
     * 查询主讲师&&商家名称 getUserById Integer userId
     */
    @Override
    public JsUser getUserById(Integer userId) {
        return orderMapper.getUserById(userId);
    }
    /*
     * create by: 赵自强
     * create time: 2022/1/27 20:30
     * @return com.pro.pojo.JsonData
     * 获取商品订单 getGoodsOrders JsUserOrder jsUserOrder
     */
    @Override
    public List<JsUserOrder> getGoodsOrders(JsUserOrder jsUserOrder) {
        return orderMapper.getGoodsOrders(jsUserOrder);
    }
    /*
     * create by: 赵自强
     * create time: 2022/2/8 13:51
     * @return com.pro.pojo.JsonData
     * 删除订单 delOrder Integer orderId
     */
    @Override
    public Boolean delOrder(Integer orderId) {
        return orderMapper.delOrder(orderId);
    }


}
